<?php

/**
 * @author MikE
 */
class Config {

	/**
	 *
	 * @var array
	 */
	private $_data;

	/**
	 * @param string $config_file
	 */
	public function __construct($config_file) {
		$this->_data = require $config_file;
	}

	/**
	 * @param string $name
	 * @return mixed
	 */
	public function data($name, $key = false) {
		$return = isset($this->_data[$name]) ? $this->_data[$name] : null;
		if ($key !== false) $return = is_array($return) && isset($return[$key]) ? $return[$key] : null;
		return $return;
	}

}

?>
